#ifndef _COOLANGAGE_PROGRAM_H_
#define _COOLANGAGE_PROGRAM_H_

#include <vector>
#include "Type.h"
#include "Expression.h"
#include "Instruction.h"

namespace COOLangage {
  typedef struct tagParametre {
    char *name;
    Type* type;
  } Parametre;

  class DeclarationFonction {
    char *name;
    Type* retour;
    std::vector<Parametre> parametres;
    Instruction* corps;
  public:
    DeclarationFonction(const char*name, Type* retour);
    virtual ~DeclarationFonction() throw();
  
    const char* getName() const;
    const Type* getType() const;
    const std::vector<Parametre> getParametres() const;
    const Instruction* getCorps() const;
  }; 


  class COOProgram {
    std::vector<DeclarationFonction*> methods;
    std::vector<DeclarationVariable*> varglobales;

  public:
    COOProgram();
    virtual ~COOProgram() throw();

    const DeclarationFonction* getFonction(const char* name) const;

    std::vector<DeclarationVariable*> getVariables() const;
    
  };
}

#endif
